package org.csmzxy.class2333;
import java.util.Scanner;
public class classwork {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个三位数");
        int num = sc.nextInt();
        if (num >= 100 && num <= 999) {
            int a = num / 100; // 百
            int b = num / 10 % 10; // 十
            int c = num % 10; // 个
            int result = (int) Math.pow(a, 3) + (int) Math.pow(b, 3) + (int) Math.pow(c, 3);
            if (result == num) {
                System.out.println(num + "是水仙花数");
            } else {
                System.out.println(num + "不是水仙花数");
            }
        } else {
            System.out.println("请输入正整数");
        }
    }
}